<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<link rel="stylesheet" href="__HOME__/css/yifenxiao.css" />
	<script src="__HOME__/js/jquery.min.js"></script>
	<script type="text/javascript" src="__HOME__/js/qrcode.min.js"></script>
	<script type="text/javascript" src="__HOME__/layer/layer.js"></script>
	<title>已分销页面</title>
	<style type="text/css">
		#bg{
	 		display: none;
	 	 	position: absolute; top: 0%; left: 0%;
	 	  	width: 100%; height: 100%; background-color: black; 
	 	  	z-index:1001; 
	 	  	-moz-opacity: 0.7; opacity:.70;
	 	   	filter: alpha(opacity=70);
		}
		#qrcode{
	 		display: none; 
	 		position: absolute;
	 		top: 50%; left: 50%;
	 	 	width: 150px; height: 150px;
	 	 	margin-left: -75px;
	 	 	margin-top:-75px; 
	 	 	border: 1px solid #E8E9F7;
	 	 	background-color: white; 
	 	 	z-index:1002; 
	 	 	overflow: auto;
	 	}
	</style>
</head>
<body>
	<div class="wrap">
		<div class="header">
			<a href="javascript:history.back(-1)"><img src="__HOME__/images/top_arrowleft.png" alt="" /></a>
			<span>分销</span>
		</div>
		<div class="conter">
			<div class="top clearfix">
				<img src="__HOME__/images/default_user_portrait_0.png" alt="" />
				<em>{$nickname}</em>
				<p>推荐人：{$parentid}</p>
			</div>
			
			<div class="row clearfix">
				<div class="row-t clearfix">
					<p>成功提现佣金</p>
					<span>￥{$sendmoney}</span>
				</div>
				<div class="row-f">
					<p>可提现拥金</p>
					<span>￥{$money}</span>
				</div>
			</div>
			
			<div class="footer">
				<ul>
					<li><a href="#">
						<img src="__HOME__/images/fx05.png" alt="" />
						<p>分销佣金</p>
						<span>{$total}元</span>
					</a></li>
					
					<li><a href="#">
						<img src="__HOME__/images/fx04.png" alt="" />
						<p>分销订单</p>
						<span>0笔</span>
					</a></li>
					
					<li><a href="#">
						<img src="__HOME__/images/fx03.png" alt="" />
						<p>提现明细</p>
						<span>0笔</span>
					</a></li>
					
					<li class="bar"><a href="#">
						<img src="__HOME__/images/fx01.png" alt="" />
						<p>我的下线</p>
						<span>0人</span>
					</a></li>
					
					<li class="bar" id="erweima"><a href="#">
						<img src="__HOME__/images/fx02.png" alt="" />
						<p>推广二维码</p>
					</a></li>
				</ul>
			</div>
		</div>
	</div>
	<div id="bg"></div>
	<div id="qrcode"></div>
</body>
<script type="text/javascript">

	//接收后台渲染的用户会员级别
	var statecheck = "{$statecheck}";   

	//判断用户级别，显示相应功能
	if(statecheck == 2){
		$('.bar').show();
		$('#erweima').on("click",function(){
			showdiv();
		});
		setInterval("hidediv()",20000);

	}else if(statecheck == 3){
		$('.bar').hide();
	}
	

	//遮罩
	function showdiv() { 
	 	document.getElementById("bg").style.display ="block";
	 	document.getElementById("qrcode").style.display ="block";
 	}
	function hidediv() {
		document.getElementById("bg").style.display ='none';
		document.getElementById("qrcode").style.display ='none';
	}

	//生成二维码,宽高不能撤销，因为是设置的二维码本身的宽高
	var qrcode = new QRCode(document.getElementById("qrcode"), {
		width : 150,
		height : 150
	});

	function makeCode (text) {		
		qrcode.makeCode(text);//输入的内容
	}
    

    var user_id = "{$user_id}";
	makeCode("http://localhost/wxshop/index.php/home/index/zhuche?user_id="+user_id);   
    
</script>
</html>